package org.qydjk.common.pojo.user;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * Created by ASUS on 2017/12/15.
 */
@Entity
@Table(name = "qy_user_money_detail", schema = "qydjk", catalog = "")
public class UserMoneyDetail {
    private Integer id;
    private Integer userId;
    private BigDecimal preMoney;
    private BigDecimal opMoney;
    private BigDecimal aftMoney;
    private Date opTime;
    private Integer opType;
    private String opDes;
    private Integer orderId;
    private String orderNo;
    private Integer orderProductId;
    private String orderProductNo;
    private Integer rechargeOrderId;
    private String rechargeOrderNo;
    private Integer extractRecordId;
    private Date createTime;
    private Date updateTime;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "user_id")
    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "pre_money")
    public BigDecimal getPreMoney() {
        return preMoney;
    }

    public void setPreMoney(BigDecimal preMoney) {
        this.preMoney = preMoney;
    }

    @Basic
    @Column(name = "op_money")
    public BigDecimal getOpMoney() {
        return opMoney;
    }

    public void setOpMoney(BigDecimal opMoney) {
        this.opMoney = opMoney;
    }

    @Basic
    @Column(name = "aft_money")
    public BigDecimal getAftMoney() {
        return aftMoney;
    }

    public void setAftMoney(BigDecimal aftMoney) {
        this.aftMoney = aftMoney;
    }

    @Basic
    @Column(name = "op_time")
    public Date getOpTime() {
        return opTime;
    }

    public void setOpTime(Date opTime) {
        this.opTime = opTime;
    }

    @Basic
    @Column(name = "op_type")
    public Integer getOpType() {
        return opType;
    }

    public void setOpType(Integer opType) {
        this.opType = opType;
    }

    @Basic
    @Column(name = "op_des")
    public String getOpDes() {
        return opDes;
    }

    public void setOpDes(String opDes) {
        this.opDes = opDes;
    }

    @Basic
    @Column(name = "order_id")
    public Integer getOrderId() {
        return orderId;
    }

    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    @Basic
    @Column(name = "order_no")
    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    @Basic
    @Column(name = "order_product_id")
    public Integer getOrderProductId() {
        return orderProductId;
    }

    public void setOrderProductId(Integer orderProductId) {
        this.orderProductId = orderProductId;
    }

    @Basic
    @Column(name = "order_product_no")
    public String getOrderProductNo() {
        return orderProductNo;
    }

    public void setOrderProductNo(String orderProductNo) {
        this.orderProductNo = orderProductNo;
    }

    @Basic
    @Column(name = "recharge_order_id")
    public Integer getRechargeOrderId() {
        return rechargeOrderId;
    }

    public void setRechargeOrderId(Integer rechargeOrderId) {
        this.rechargeOrderId = rechargeOrderId;
    }

    @Basic
    @Column(name = "recharge_order_no")
    public String getRechargeOrderNo() {
        return rechargeOrderNo;
    }

    public void setRechargeOrderNo(String rechargeOrderNo) {
        this.rechargeOrderNo = rechargeOrderNo;
    }

    @Basic
    @Column(name = "extract_record_id")
    public Integer getExtractRecordId() {
        return extractRecordId;
    }

    public void setExtractRecordId(Integer extractRecordId) {
        this.extractRecordId = extractRecordId;
    }

    @Basic
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "update_time")
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        UserMoneyDetail that = (UserMoneyDetail) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (userId != null ? !userId.equals(that.userId) : that.userId != null) return false;
        if (preMoney != null ? !preMoney.equals(that.preMoney) : that.preMoney != null) return false;
        if (opMoney != null ? !opMoney.equals(that.opMoney) : that.opMoney != null) return false;
        if (aftMoney != null ? !aftMoney.equals(that.aftMoney) : that.aftMoney != null) return false;
        if (opTime != null ? !opTime.equals(that.opTime) : that.opTime != null) return false;
        if (opType != null ? !opType.equals(that.opType) : that.opType != null) return false;
        if (opDes != null ? !opDes.equals(that.opDes) : that.opDes != null) return false;
        if (orderId != null ? !orderId.equals(that.orderId) : that.orderId != null) return false;
        if (orderNo != null ? !orderNo.equals(that.orderNo) : that.orderNo != null) return false;
        if (orderProductId != null ? !orderProductId.equals(that.orderProductId) : that.orderProductId != null)
            return false;
        if (orderProductNo != null ? !orderProductNo.equals(that.orderProductNo) : that.orderProductNo != null)
            return false;
        if (rechargeOrderId != null ? !rechargeOrderId.equals(that.rechargeOrderId) : that.rechargeOrderId != null)
            return false;
        if (rechargeOrderNo != null ? !rechargeOrderNo.equals(that.rechargeOrderNo) : that.rechargeOrderNo != null)
            return false;
        if (extractRecordId != null ? !extractRecordId.equals(that.extractRecordId) : that.extractRecordId != null)
            return false;
        if (createTime != null ? !createTime.equals(that.createTime) : that.createTime != null) return false;
        if (updateTime != null ? !updateTime.equals(that.updateTime) : that.updateTime != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (userId != null ? userId.hashCode() : 0);
        result = 31 * result + (preMoney != null ? preMoney.hashCode() : 0);
        result = 31 * result + (opMoney != null ? opMoney.hashCode() : 0);
        result = 31 * result + (aftMoney != null ? aftMoney.hashCode() : 0);
        result = 31 * result + (opTime != null ? opTime.hashCode() : 0);
        result = 31 * result + (opType != null ? opType.hashCode() : 0);
        result = 31 * result + (opDes != null ? opDes.hashCode() : 0);
        result = 31 * result + (orderId != null ? orderId.hashCode() : 0);
        result = 31 * result + (orderNo != null ? orderNo.hashCode() : 0);
        result = 31 * result + (orderProductId != null ? orderProductId.hashCode() : 0);
        result = 31 * result + (orderProductNo != null ? orderProductNo.hashCode() : 0);
        result = 31 * result + (rechargeOrderId != null ? rechargeOrderId.hashCode() : 0);
        result = 31 * result + (rechargeOrderNo != null ? rechargeOrderNo.hashCode() : 0);
        result = 31 * result + (extractRecordId != null ? extractRecordId.hashCode() : 0);
        result = 31 * result + (createTime != null ? createTime.hashCode() : 0);
        result = 31 * result + (updateTime != null ? updateTime.hashCode() : 0);
        return result;
    }
}
